package cn.shengchao.examstar.me.infrastructure.dao.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Set;

/**
 * @program: examstarapi
 * @description: 用户信息采集表
 * @author: Xiong weiqiang
 * @create: 2025-04-14 11:42
 */
@Data
@TableName(value = "user_collect_info",autoResultMap = true)
public class UserCollectInfo implements Serializable {
    @TableId(type= IdType.INPUT, value = "user_id")
    private Long userId;
    @TableField("phone")
    private String phone;
    @TableField("name")
    private String name;
    @TableField("source_chanel")
    private String sourceChanel;
    @TableField("vip_level")
    private Integer vipLevel;
    @TableField("vip_score")
    private Integer vipScore;
    @TableField("gender")
    private Integer gender;
    @TableField("grade_type")
    private String gradeType;

    @TableField("grade_level")
    private Integer gradeLevel;

    @TableField("grade_time")
    private Date gradeTime;

    @TableField("register_time")
    private LocalDateTime registerTime;
    @TableField("last_update_time")
    private Date lastUpdateTime;
    //sql搜索 json_search(tag,"all","%tag%")
    //sql是否存在 json_contains(tag,"tag")
    //不存在新增 json_array_append(tag, '$', 'tag')
    //存在删除 json_remove(tag, '$')
    @TableField(value = "tags",typeHandler = JacksonTypeHandler.class)
    private Set<String> tags;

    @TableField("remark")
    private String remark;

}